#ifndef _EWLCD_H_
#define _EWLCD_H_

#include "ardew.h"

#define RS 0
#define RW 1
#define ENABLE 2
#define D0 3
#define D1 4
#define D2 5
#define D3 6
#define D4 7
#define D5 8
#define D6 9
#define D7 10

void lcd_setup(uint8_t crs
               , uint8_t crw
               , uint8_t ce
               , uint8_t cd0
               , uint8_t cd1
               , uint8_t cd2
               , uint8_t cd3
               , uint8_t cd4
               , uint8_t cd5
               , uint8_t cd6
               , uint8_t cd7);
void ld_transmit();
void lcd_clear();
void lcd_home();
void lcd_entrymode(uint8_t cursorincdec, uint8_t dispshift);
void lcd_setdisplay(uint8_t dispon, uint8_t cursoron, uint8_t blinkon);
void lcd_shift(uint8_t dispshift, uint8_t rightshift);
void lcd_setfunction(uint8_t bits8, uint8_t lines2, uint8_t dots10);

void lcd_putc(uint8_t c);
void lcd_puts(uint8_t* s);

#endif
